// Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov  Date: 04/11/2009 2:58:06 PM
// Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   HunterDrizzt.java
// 
// AS PASTEBIN IS EDITABLE BY ANYONE, PLEASE USE ONLY THE ORIGINAL COPY
// AND NOT ANY EDITS.
//
//

import com.speljohan.rsbot.bot.Bot;
import com.speljohan.rsbot.event.EventManager;
import com.speljohan.rsbot.event.events.ServerMessageEvent;
import com.speljohan.rsbot.event.listeners.PaintListener;
import com.speljohan.rsbot.event.listeners.ServerMessageListener;
import com.speljohan.rsbot.script.Calculations;
import com.speljohan.rsbot.script.InputManager;
import com.speljohan.rsbot.script.Script;
import com.speljohan.rsbot.script.Skills;
import com.speljohan.rsbot.script.wrappers.RSInterface;
import com.speljohan.rsbot.script.wrappers.RSItemTile;
import com.speljohan.rsbot.script.wrappers.RSObject;
import com.speljohan.rsbot.script.wrappers.RSPlayer;
import com.speljohan.rsbot.script.wrappers.RSTile;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Map;

public class HunterDrizzt extends Script
    implements ServerMessageListener, PaintListener
{

    public HunterDrizzt()
    {
        Tree1 = new RSTile(3553, 3450);
        Tree2 = new RSTile(3553, 3453);
        Tree3 = new RSTile(3553, 3453);
        Tree4 = new RSTile(3553, 3453);
        Lizards = 0;
        BG = new Color(0, 0, 0, 75);
        Debug = false;
        S1T1 = new RSTile(2500, 2940);
        S1T2 = new RSTile(2502, 2940);
        S1T3 = new RSTile(2502, 2938);
        S1T4 = new RSTile(2500, 2938);
        S1T5 = new RSTile(2501, 2939);
        S2T1 = new RSTile(2504, 2906);
        S2T2 = new RSTile(2504, 2908);
        S2T3 = new RSTile(2506, 2908);
        S2T4 = new RSTile(2506, 2906);
        S2T5 = new RSTile(2505, 2907);
        S3T1 = new RSTile(2523, 2895);
        S3T2 = new RSTile(2523, 2897);
        S3T3 = new RSTile(2525, 2897);
        S3T4 = new RSTile(2525, 2895);
        S3T5 = new RSTile(2524, 2896);
        S4T1 = new RSTile(2556, 2915);
        S4T2 = new RSTile(2556, 2917);
        S4T3 = new RSTile(2558, 2917);
        S4T4 = new RSTile(2558, 2915);
        S4T5 = new RSTile(2557, 2916);
        S5T1 = new RSTile(2554, 2931);
        S5T2 = new RSTile(2556, 2932);
        S5T3 = new RSTile(2555, 2929);
        S5T4 = new RSTile(2554, 2930);
        S5T5 = new RSTile(2553, 2929);
        TrapR1 = new RSTile(2500, 2940);
        TrapR2 = new RSTile(2502, 2940);
        TrapR3 = new RSTile(2502, 2938);
        TrapR4 = new RSTile(2500, 2938);
        TrapR5 = new RSTile(2501, 2939);
        Green = false;
        Orange = false;
        Red = false;
        Black = false;
        RChin = false;
        STail = false;
        Two = true;
        Diamond = false;
        Square = true;
        powerMode = false;
        randomRun = random(40, 75);
        startExp = 0;
        Points = 0;
        StartPoints = 0;
        PointsString = "LuLWuT?";
        startLevel = 0;
        startXP = 0;
        startTime = System.currentTimeMillis();
        time = System.currentTimeMillis();
        FailCount = 0;
        WelcumCount = 0;
        RTrap1 = null;
        RTrap2 = null;
        RTrap3 = null;
        RTrap4 = null;
        Trap1Set = false;
        Trap2Set = false;
        Trap3Set = false;
        Trap4Set = false;
        Trap5Set = false;
        CTree1 = new RSTile(2609, 2896);
        CTree2 = new RSTile(2612, 2896);
        CTrap1 = getObjectAt(CTree1);
        CTrap2 = getObjectAt(CTree2);
        TempCount = 0;
        CTrap1ID = 0;
        CTrap2ID = 0;
        AntiBanDebug = true;
        oldPosition = new RSTile(0, 0);
        logout = false;
        standingCount = 0;
    }

    public String getAuthor()
    {
        return "Drizzt1112";
    }

    public String getName()
    {
        return "HunterDrizzt";
    }

    public double getVersion()
    {
        return 4.9000000000000004D;
    }

    public String getScriptCategory()
    {
        return "Drizzt1112";
    }

    public String getScriptDescription()
    {
        String s = "";
        s = (new StringBuilder()).append(s).append("<html>").toString();
        s = (new StringBuilder()).append(s).append("<head>").toString();
        s = (new StringBuilder()).append(s).append("<style type=\"text/css\"> hr {color: sienna} p {margin-left: 20px} body {background-image: url(\"http://i40.tinypic.com/2je4pyp.jpg\")}</style>").toString();
        s = (new StringBuilder()).append(s).append("</head>").toString();
        s = (new StringBuilder()).append(s).append("<body>").toString();
        s = (new StringBuilder()).append(s).append("<center>").toString();
        s = (new StringBuilder()).append(s).append("<body color=red>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>").toString();
        s = (new StringBuilder()).append(s).append("<h2><font color=red>").append(getName()).append(" v").append(getVersion()).append("</h2><br>").toString();
        s = (new StringBuilder()).append(s).append("<b><font color=red>Author: </b><font color=red>").append(getAuthor()).append("<br>\n").toString();
        s = (new StringBuilder()).append(s).append(" <h1><font color=red>Don't get banned =)</h1>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>ChinChompa: Start at the spot near the lake with 5+ boxes<br>").toString();
        s = (new StringBuilder()).append(s).append("<br>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>Lizard: Start at the trees with 3+ ropes and nets.<br>").toString();
        s = (new StringBuilder()).append(s).append("<br>").toString();
        s = (new StringBuilder()).append(s).append("<b><font color=red>Arguments:</b><br>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>What to hunt?:  ").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;Green Lizard:<input type=\"radio\" name=\"style\" value=\"Green\" checked=\"checked\"> ").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;Orange Lizard:<input type=\"radio\" name=\"style\" value=\"Orange\"> ").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;Red Lizard:<input type=\"radio\" name=\"style\" value=\"Red\">").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;Black Lizard:<input type=\"radio\" name=\"style\" value=\"Black\"><br>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;Red Chinchompa:<input type=\"radio\" name=\"style\" value=\"RChin\"><br>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;Crimson Swift:<input type=\"radio\" name=\"style\" value=\"STail\"><br>").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;&nbsp;&nbsp;Debug? <input type=\"checkbox\" name=\"debug\" value=\"no\" >").toString();
        s = (new StringBuilder()).append(s).append("<font color=red>&nbsp;&nbsp;&nbsp;Diamond (Chins)? <input type=\"checkbox\" name=\"Diamond\" value=\"no\" >").toString();
        s = (new StringBuilder()).append(s).append("</center>").toString();
        s = (new StringBuilder()).append(s).append("</body>").toString();
        s = (new StringBuilder()).append(s).append("</html>").toString();
        return s;
    }

    public boolean onStart(Map map)
    {
   	log("Activation removed by yours truly, Bloodyargon");
        if(((String)map.get("style")).equals("Green"))
        {
            Green = true;
            BG = new Color(0, 100, 0, 75);
        }
        if(((String)map.get("style")).equals("Orange"))
        {
            Orange = true;
            BG = new Color(150, 100, 0, 75);
        }
        if(((String)map.get("style")).equals("STail"))
        {
            STail = true;
            BG = new Color(150, 70, 0, 75);
        }
        if(((String)map.get("style")).equals("Red"))
        {
            Red = true;
            BG = new Color(100, 0, 0, 75);
        }
        if(((String)map.get("style")).equals("Black"))
        {
            Black = true;
            BG = new Color(0, 0, 0, 75);
        }
        if(((String)map.get("style")).equals("RChin"))
        {
            RChin = true;
            BG = new Color(100, 0, 0, 75);
        }
        if(map.get("Diamond") != null)
        {
            Diamond = true;
            Square = false;
        }
        if(distanceTo(S1T5) < 10)
        {
            TrapR1 = S1T1;
            TrapR2 = S1T2;
            TrapR3 = S1T3;
            TrapR4 = S1T4;
            TrapR5 = S1T5;
        }
        if(distanceTo(S2T5) < 10)
        {
            TrapR1 = S2T1;
            TrapR2 = S2T2;
            TrapR3 = S2T3;
            TrapR4 = S2T4;
            TrapR5 = S2T5;
        }
        if(distanceTo(S3T5) < 10)
        {
            TrapR1 = S3T1;
            TrapR2 = S3T2;
            TrapR3 = S3T3;
            TrapR4 = S3T4;
            TrapR5 = S3T5;
        }
        if(distanceTo(S4T5) < 10)
        {
            TrapR1 = S4T1;
            TrapR2 = S4T2;
            TrapR3 = S4T3;
            TrapR4 = S4T4;
            TrapR5 = S4T5;
        }
        if(distanceTo(S5T5) < 10)
        {
            TrapR1 = S5T1;
            TrapR2 = S5T2;
            TrapR3 = S5T3;
            TrapR4 = S5T4;
            TrapR5 = S5T5;
        }
        int i = getMyPlayer().getLocation().getX();
        int j = getMyPlayer().getLocation().getY();
        if(Square)
        {
            TrapR1 = new RSTile(i - 1, j + 1);
            TrapR2 = new RSTile(i - 1, j - 1);
            TrapR3 = new RSTile(i + 1, j - 1);
            TrapR4 = new RSTile(i + 1, j + 1);
            TrapR5 = new RSTile(i, j);
        }
        if(Diamond)
        {
            TrapR1 = new RSTile(i, j - 1);
            TrapR2 = new RSTile(i + 1, j);
            TrapR3 = new RSTile(i, j + 1);
            TrapR4 = new RSTile(i - 1, j);
            TrapR5 = new RSTile(i, j);
        }
        if(map.get("debug") != null)
            Debug = true;
        if(CheckIP())
            return true;
        if(!CheckIP())
        {
            log("N00B, Don't use leaked scripts.  If you have bought the script and get this message, contact Drizzt1112@gmail.com");
            return false;
        } else
        {
            return false;
        }
    }

    public void onFinish()
    {
		Bot.getEventManager().removeListener(ServerMessageListener.class, this);
		Bot.getEventManager().removeListener(PaintListener.class, this);
    }

    public void serverMessageRecieved(ServerMessageEvent servermessageevent)
    {
        String s = servermessageevent.getMessage().toLowerCase();
        if(s.contains("darts away"))
            Lizards++;
        if(s.contains("caught a carni"))
            Lizards++;
        if(s.contains("caught a crimson sw"))
            Lizards++;
        if(s.contains("a trap here"))
        {
            WalkSmart(new RSTile(Loc().getX() + random(-3, 3), Loc().getY() + random(-3, 3)));
            for(; getMyPlayer().isMoving(); wait(random(200, 500)));
        }
    }

    public void onRepaint(Graphics g)
    {
        if(isLoggedIn())
        {
            byte byte0 = 21;
            int i = 0;
            long l = 0L;
            long l1 = 0L;
            long l2 = 0L;
            if(startTime == 0L)
                startTime = System.currentTimeMillis();
            long l3 = System.currentTimeMillis() - startTime;
            l2 = l3 / 1000L;
            if(l2 >= 60L)
            {
                l1 = l2 / 60L;
                l2 -= l1 * 60L;
            }
            if(l1 >= 60L)
            {
                l = l1 / 60L;
                l1 -= l * 60L;
            }
            if(startLevel == 0 || startExp == 0)
            {
                startLevel = skills.getCurrentSkillLevel(21);
                startExp = skills.getCurrentSkillExp(21);
                oldExp = 0;
            }
            i = skills.getCurrentSkillExp(21) - startExp;
            if(i > oldExp)
            {
                xpPerRock = i - oldExp;
                oldExp = i;
                rockCount++;
                countToNext = skills.getXPToNextLevel(21) / xpPerRock + 1;
            }
            int j = skills.getCurrentSkillLevel(byte0) - startLevel;
            if(j > oldLevels)
                oldLevels = j;
            if(System.currentTimeMillis() - lastAvgCheck >= 60000L)
            {
                lastAvgCheck = System.currentTimeMillis();
                avgPerHour = (rockCount - oldRockCount) * 60;
                oldRockCount = rockCount;
                if(!CheckIPNoDebug())
                    log("Leecher....");
            }
            Color color = new Color(255, 0, 0, 255);
            Color color1 = new Color(0, 255, 0, 255);
            Color color2 = new Color(0, 0, 0, 255);
            int k = Points - StartPoints;
            byte byte1 = 21;
            long l4 = System.currentTimeMillis() - startTime;
            l4 -= l * 1000L * 60L * 60L;
            l4 -= l1 * 1000L * 60L;
            int i1 = skills.getCurrentSkillExp(byte1) - startXP;
            int j1 = i1 / 240;
            int k1 = skills.getXPToNextLevel(byte1) / 288;
            int i2 = skills.getCurrentSkillLevel(byte1) - startLevel;
            int j2 = skills.getPercentToNextLevel(byte1);
            int k2 = skills.getCurrentSkillLevel(byte1) + 1;
            g.setColor(BG);
            g.fill3DRect(5, 25, 205, 143, true);
            g.setColor(Color.white);
            g.drawString((new StringBuilder()).append(getName()).append(" v.").append(getVersion()).append(" by Drizzt1112").toString(), 10, 40);
            g.drawString((new StringBuilder()).append("Running for: ").append(l).append("h ").append(l1).append("m ").append(l2).append("s").toString(), 10, 60);
            g.drawString((new StringBuilder()).append("XP Gained: ").append(i).append("   Lvls Gained: ").append(i2).toString(), 10, 80);
            g.drawString((new StringBuilder()).append("XP To next lvl: ").append(skills.getXPToNextLevel(byte1)).toString(), 10, 100);
            g.drawString("Progress to next lvl:", 10, 120);
            g.setColor(color);
            g.fill3DRect(10, 130, 100, 10, true);
            g.setColor(color1);
            g.fill3DRect(10, 130, j2, 10, true);
            g.setColor(color2);
            g.drawString((new StringBuilder()).append(j2).append("%  to ").append(k2).toString(), 40, 139);
            g.setColor(Color.white);
            g.drawString((new StringBuilder()).append("Catches: ").append(Lizards / 2).toString(), 10, 160);
            if(Debug && RChin)
            {
                g.setColor(Color.white);
                g.drawString((new StringBuilder()).append("Trap1Set: ").append(Trap1Set).toString(), 370, 30);
                g.drawString((new StringBuilder()).append("Trap2Set: ").append(Trap2Set).toString(), 370, 50);
                g.drawString((new StringBuilder()).append("Trap3Set: ").append(Trap3Set).toString(), 370, 70);
                g.drawString((new StringBuilder()).append("Trap4Set: ").append(Trap4Set).toString(), 370, 90);
                g.drawString((new StringBuilder()).append("Trap5Set: ").append(Trap5Set).toString(), 370, 110);
                g.drawString((new StringBuilder()).append("TempCount: ").append(TempCount).toString(), 370, 130);
            }
            if(Debug && STail)
            {
                g.setColor(Color.white);
                g.drawString((new StringBuilder()).append("CTrap1 =  ").append(CTrap1).toString(), 370, 30);
                g.drawString((new StringBuilder()).append("CTrap2 = ").append(CTrap2).toString(), 370, 50);
                g.drawString((new StringBuilder()).append("CTrap1ID =  ").append(CTrap1ID).toString(), 370, 70);
                g.drawString((new StringBuilder()).append("CTrap2ID: ").append(CTrap2ID).toString(), 370, 90);
            }
        }
    }

    public int loop()
    {
        RSInterface rsinterface = RSInterface.getInterface(378);
        if(getEnergy() == random(31, 56) || getEnergy() > 56)
            setRun(true);
        if(STail)
        {
            int i = skills.getCurrentSkillLevel(21);
            char c4 = '\u4AEC';
            char c9 = '\u4AE7';
            char c14 = '\u4AE6';
            RSTile rstile = new RSTile(2610, 2896);
            char c23 = '\u2716';
            char c28 = '\u1458';
            char c29 = '\u1457';
            char c30 = '\u4AEB';
            RSObject rsobject12 = findObject(new int[] {
                c4
            });
            RSObject rsobject14 = findObject(new int[] {
                c9
            });
            RSObject rsobject16 = findObject(new int[] {
                c14
            });
            RSObject rsobject17 = findObject(new int[] {
                c30
            });
            RSItemTile rsitemtile7 = getGroundItemByID(c23);
            RSTile rstile3 = new RSTile(2609, 2896);
            RSTile rstile4 = new RSTile(2612, 2896);
            RSObject rsobject18 = getObjectAt(rstile3);
            RSObject rsobject19 = getObjectAt(rstile4);
            if(rsobject18 != null)
                CTrap1ID = rsobject18.getID();
            if(rsobject19 != null)
                CTrap2ID = rsobject19.getID();
            if(Anim() != -1)
            {
                wait(random(500, 700));
                return random(159, 400);
            }
            if(distanceTo(rstile) > 15)
            {
                WalkSmart(rstile);
                return random(500, 800);
            }
            if(rsitemtile7 != null)
            {
                atTileD(rsitemtile7, "Take");
                wait(random(1400, 2500));
                return random(500, 1000);
            }
            if(rsobject12 != null)
            {
                atObjectD(rsobject12, "Check");
                wait(random(1400, 2500));
                return random(500, 1000);
            }
            if(rsobject16 != null)
            {
                atObjectD(rsobject16, "Dismantle");
                wait(random(1400, 2500));
                return random(500, 1000);
            }
            if(rsobject14 != null && distanceTo(rsobject14) < 2)
            {
                WalkRandom(1, 1, 3, 3);
                return random(500, 800);
            }
            if(rsobject14 != null)
            {
                if(inventoryContains(new int[] {
    9978
}))
                    atInventoryItem(9978, "Drop");
                if(inventoryContains(new int[] {
    526
}))
                    atInventoryItem(526, "Drop");
                if(inventoryContains(new int[] {
    1511
}))
                    atInventoryItem(1511, "Drop");
                return random(500, 1000);
            }
            if(inventoryContains(new int[] {
    c23
}) && (rsobject14 == null && rsobject12 == null && rsobject16 == null))
            {
                clickInventoryItem(c23, true);
                wait(random(2500, 4000));
                return random(500, 700);
            }
        }
        if(Green)
        {
            char c = '\u4CDF';
            char c5 = '\u4CDE';
            char c10 = '\u4CDB';
            char c15 = '\u27A5';
            char c19 = '\u03BA';
            char c24 = '\u012F';
            Tree3 = new RSTile(3550, 3549);
            RSObject rsobject = getObjectAt(Tree1);
            RSObject rsobject1 = getObjectAt(Tree2);
            RSObject rsobject4 = getObjectAt(Tree3);
            if(FailCount > 20)
            {
                log("Failed");
                logout();
                stopAllScripts();
            }
            if(distanceTo(Tree1) < 18)
            {
                if(getMyPlayer().getAnimation() == 5215 || getMyPlayer().getAnimation() == 5207)
                {
                    FailCount = 0;
                    return random(200, 400);
                }
                if(inventoryContains(new int[] {
    c15
}) && getInventoryCount() > 25)
                {
                    FailCount = 0;
                    atInventoryItem(c15, "Release");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                RSItemTile rsitemtile1 = getGroundItemByID(c19);
                if(rsitemtile1 != null && !isInventoryFull())
                {
                    FailCount = 0;
                    atTileTake(rsitemtile1, "Take");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                RSItemTile rsitemtile2 = getGroundItemByID(c24);
                if(rsitemtile2 != null && !isInventoryFull())
                {
                    atTileTake(rsitemtile2, "Take");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                if(rsobject.getID() == c && inventoryContains(new int[] {
    c19
}) && inventoryContains(new int[] {
    c24
}))
                {
                    atTileDrizztG(Tree1, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(rsobject1.getID() == c && inventoryContains(new int[] {
    c19
}) && inventoryContains(new int[] {
    c24
}))
                {
                    atTileDrizztG(Tree2, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(rsobject.getID() == c10)
                {
                    atTileDrizztG(Tree1, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject1.getID() == c10)
                {
                    atTileDrizztG(Tree2, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(inventoryContains(new int[] {
    c15
}))
                {
                    atInventoryItem(c15, "Release");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                if(rsobject.getID() == c5)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(rsobject1.getID() == c5)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(!inventoryContains(new int[] {
    c19
}) || !inventoryContains(new int[] {
    c24
}))
                {
                    wait(random(6000, 8000));
                    if(!inventoryContains(new int[] {
    c19
}) || !inventoryContains(new int[] {
    c24
}))
                    {
                        log("Outta ropes/nets..");
                        logout();
                        stopAllScripts();
                    }
                }
            }
        }
        if(Orange)
        {
            char c1 = '\u4CC4';
            char c6 = '\u4CC2';
            char c11 = '\u4CC6';
            char c16 = '\u27A2';
            char c20 = '\u03BA';
            char c25 = '\u012F';
            Tree1 = new RSTile(3412, 3075);
            Tree2 = new RSTile(3415, 3073);
            Tree3 = new RSTile(3414, 3078);
            RSTile rstile1 = new RSTile(3414, 3076);
            RSObject rsobject2 = getObjectAt(Tree1);
            RSObject rsobject5 = getObjectAt(Tree2);
            RSObject rsobject8 = getObjectAt(Tree3);
            if(FailCount > 20)
            {
                log("Failed");
                logout();
                stopAllScripts();
            }
            if(distanceTo(Tree1) < 18)
            {
                if(getMyPlayer().getAnimation() == 5215 || getMyPlayer().getAnimation() == 5207)
                {
                    FailCount = 0;
                    return random(200, 400);
                }
                if(inventoryContains(new int[] {
    c16
}) && getInventoryCount() > 25)
                {
                    FailCount = 0;
                    atInventoryItem(c16, "Release");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                RSItemTile rsitemtile3 = getGroundItemByID(c20);
                if(rsitemtile3 != null && !isInventoryFull())
                {
                    FailCount = 0;
                    atTileTake(rsitemtile3, "Take");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                RSItemTile rsitemtile5 = getGroundItemByID(c25);
                if(rsitemtile5 != null && !isInventoryFull())
                {
                    atTileTake(rsitemtile5, "Take");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                if(rsobject2.getID() == c11 && getInventoryCount() < 26)
                {
                    atTileDrizztO(Tree1, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject5.getID() == c11 && getInventoryCount() < 26)
                {
                    atTileDrizztO(Tree2, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject8.getID() == c11 && getInventoryCount() < 26)
                {
                    atTileDrizztO(Tree3, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject2.getID() == c1 && inventoryContains(new int[] {
    c20
}) && inventoryContains(new int[] {
    c25
}))
                {
                    atTileDrizztO(Tree1, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(rsobject5.getID() == c1 && inventoryContains(new int[] {
    c20
}) && inventoryContains(new int[] {
    c25
}))
                {
                    atTileDrizztO(Tree2, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(rsobject8.getID() == c1 && inventoryContains(new int[] {
    c20
}) && inventoryContains(new int[] {
    c25
}))
                {
                    atTileDrizztO(Tree3, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(inventoryContains(new int[] {
    c16
}))
                {
                    atInventoryItem(c16, "Release");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                if(rsobject2.getID() == c6)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(rsobject5.getID() == c6)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(rsobject8.getID() == c6)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(!inventoryContains(new int[] {
    c20
}) || !inventoryContains(new int[] {
    c25
}))
                {
                    wait(random(6000, 8000));
                    if(!inventoryContains(new int[] {
    c20
}) || !inventoryContains(new int[] {
    c25
}))
                    {
                        log("Outta ropes/nets..");
                        logout();
                        stopAllScripts();
                    }
                }
            }
        }
        if(Black)
        {
            log("Not supported yet");
            stopAllScripts();
        }
        if(Red)
        {
            char c2 = '\u4CCF';
            char c7 = '\u4CCE';
            char c12 = '\u4CCB';
            char c17 = '\u27A3';
            char c21 = '\u03BA';
            char c26 = '\u012F';
            Tree1 = new RSTile(2472, 3238);
            Tree2 = new RSTile(2475, 3236);
            Tree3 = new RSTile(2467, 3242);
            RSTile rstile2 = new RSTile(3414, 3076);
            RSObject rsobject3 = getObjectAt(Tree1);
            RSObject rsobject6 = getObjectAt(Tree2);
            RSObject rsobject9 = getObjectAt(Tree3);
            if(FailCount > 20)
            {
                log("Failed");
                logout();
                stopAllScripts();
            }
            if(distanceTo(Tree1) < 18)
            {
                for(; getMyPlayer().isInCombat(); wait(random(500, 1000)));
                if(getMyPlayer().getAnimation() == 5215 || getMyPlayer().getAnimation() == 5207)
                {
                    FailCount = 0;
                    return random(200, 400);
                }
                if(inventoryContains(new int[] {
    c17
}) && getInventoryCount() > 25)
                {
                    FailCount = 0;
                    atInventoryItem(c17, "Release");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                RSItemTile rsitemtile4 = getGroundItemByID(c21);
                if(rsitemtile4 != null && !isInventoryFull())
                {
                    FailCount = 0;
                    atTileTake(rsitemtile4, "Take");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                RSItemTile rsitemtile6 = getGroundItemByID(c26);
                if(rsitemtile6 != null && !isInventoryFull())
                {
                    atTileTake(rsitemtile6, "Take");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                if(rsobject3.getID() == c12 && getInventoryCount() < 26)
                {
                    atTileDrizztR(Tree1, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject6.getID() == c12 && getInventoryCount() < 26)
                {
                    atTileDrizztR(Tree2, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject9.getID() == c12 && getInventoryCount() < 26)
                {
                    atTileDrizztR(Tree3, "Check");
                    FailCount = 0;
                    wait(random(1000, 1400));
                    return random(200, 400);
                }
                if(rsobject3.getID() == c2 && inventoryContains(new int[] {
    c21
}) && inventoryContains(new int[] {
    c26
}))
                {
                    atTileDrizztR(Tree1, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(rsobject6.getID() == c2 && inventoryContains(new int[] {
    c21
}) && inventoryContains(new int[] {
    c26
}))
                {
                    atTileDrizztR(Tree2, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(rsobject9.getID() == c2 && inventoryContains(new int[] {
    c21
}) && inventoryContains(new int[] {
    c26
}))
                {
                    atTileDrizztR(Tree3, "Set-Trap");
                    FailCount = 0;
                    wait(random(1400, 1900));
                    return random(200, 400);
                }
                if(inventoryContains(new int[] {
    c17
}))
                {
                    atInventoryItem(c17, "Release");
                    wait(random(200, 900));
                    return random(200, 400);
                }
                if(rsobject3.getID() == c7)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(rsobject6.getID() == c7)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(rsobject9.getID() == c7)
                {
                    wait(random(100, 140));
                    return random(200, 400);
                }
                if(!inventoryContains(new int[] {
    c21
}) || !inventoryContains(new int[] {
    c26
}))
                {
                    wait(random(6000, 8000));
                    if(!inventoryContains(new int[] {
    c21
}) || !inventoryContains(new int[] {
    c26
}))
                    {
                        log("Outta ropes/nets..");
                        logout();
                        stopAllScripts();
                    }
                }
            }
        }
        if(RChin)
        {
            char c3 = '\u2718';
            char c8 = '\u4AF3';
            char c13 = '\u4AF8';
            char c18 = '\u4AF6';
            char c22 = '\u145C';
            char c27 = '\u1458';
            int ai[] = {
                19192, 19190, 19187
            };
            if(getMyPlayer().isMoving())
                return random(500, 1000);
            if(getMyPlayer().getAnimation() != -1)
                return random(500, 1000);
            TempCount = 0;
            RSItemTile rsitemtile = getGroundItemByID(c3);
            RSObject rsobject7 = getObjectAt(TrapR1);
            RSObject rsobject10 = getObjectAt(TrapR2);
            RSObject rsobject11 = getObjectAt(TrapR3);
            RSObject rsobject13 = getObjectAt(TrapR4);
            RSObject rsobject15 = getObjectAt(TrapR5);
            int j = 0;
            int k = 0;
            int l = 0;
            int i1 = 0;
            int j1 = 0;
            if(rsobject7 == null)
            {
                wait(random(1000, 1500));
                if(rsobject7 == null)
                    Trap1Set = false;
                if(rsobject10 == null)
                    Trap1Set = false;
                if(rsobject11 == null)
                    Trap1Set = false;
                if(rsobject13 == null)
                    Trap1Set = false;
                if(rsobject15 == null)
                    Trap1Set = false;
            }
            int k1 = 0;
            int l1 = 0;
            int i2 = 0;
            int j2 = 0;
            int k2 = 0;
            if(rsobject7 != null)
                k1 = rsobject7.getID();
            if(rsobject10 != null)
                l1 = rsobject10.getID();
            if(rsobject11 != null)
                i2 = rsobject11.getID();
            if(rsobject13 != null)
                j2 = rsobject13.getID();
            if(rsobject15 != null)
                k2 = rsobject15.getID();
            if(rsobject7 != null)
                j = rsobject7.getID();
            if(rsobject10 != null)
                k = rsobject10.getID();
            if(rsobject11 != null)
                l = rsobject11.getID();
            if(rsobject13 != null)
                i1 = rsobject13.getID();
            if(rsobject15 != null)
                j1 = rsobject15.getID();
            int l2 = skills.getCurrentSkillLevel(21);
            if(PickUpR(rsitemtile))
                return random(500, 1000);
            if(k1 == c18 && Trap1Set)
            {
                if(atTileRChin(TrapR1, "Check"))
                {
                    Trap1Set = false;
                    wait(random(900, 1500));
                }
                return random(150, 300);
            }
            if(l1 == c18 && Trap2Set)
            {
                if(atTileRChin(TrapR2, "Check"))
                {
                    Trap2Set = false;
                    wait(random(900, 1500));
                }
                return random(150, 300);
            }
            if(i2 == c18 && Trap3Set)
            {
                if(atTileRChin(TrapR3, "Check"))
                {
                    Trap3Set = false;
                    wait(random(900, 1500));
                }
                return random(150, 300);
            }
            if(j2 == c18 && Trap4Set)
            {
                if(atTileRChin(TrapR4, "Check"))
                {
                    Trap4Set = false;
                    wait(random(900, 1500));
                }
                return random(150, 300);
            }
            if(l2 > 79 && k2 == c18 && Trap5Set)
            {
                if(atTileRChin(TrapR5, "Check"))
                {
                    Trap5Set = false;
                    wait(random(900, 1500));
                }
                return random(150, 300);
            }
            if(k1 == c13 && Trap1Set)
            {
                if(atTileRChin(TrapR1, "Dismantle"))
                {
                    while(getObjectAt(TrapR1) != null) 
                    {
                        wait(random(500, 900));
                        TempCount++;
                        if(TempCount > 15)
                            return random(150, 600);
                    }
                    Trap1Set = false;
                }
                return random(150, 300);
            }
            if(l1 == c13 && Trap2Set && atTileRChin(TrapR2, "Dismantle"))
            {
                while(getObjectAt(TrapR2) != null) 
                {
                    wait(random(500, 900));
                    TempCount++;
                    if(TempCount > 15)
                        return random(150, 600);
                }
                Trap2Set = false;
            }
            if(i2 == c13 && Trap3Set)
            {
                if(atTileRChin(TrapR3, "Dismantle"))
                {
                    while(getObjectAt(TrapR3) != null) 
                    {
                        wait(random(500, 900));
                        TempCount++;
                        if(TempCount > 15)
                            return random(150, 600);
                    }
                    Trap3Set = false;
                }
                return random(150, 300);
            }
            if(i1 == c13 && Trap4Set)
            {
                if(atTileRChin(TrapR4, "Dismantle"))
                {
                    while(getObjectAt(TrapR4) != null) 
                    {
                        wait(random(500, 900));
                        TempCount++;
                        if(TempCount > 15)
                            return random(150, 600);
                    }
                    Trap4Set = false;
                }
                return random(150, 300);
            }
            if(l2 > 79 && k2 == c13 && Trap5Set)
            {
                if(atTileRChin(TrapR5, "Dismantle"))
                {
                    while(getObjectAt(TrapR5) != null) 
                    {
                        wait(random(500, 900));
                        TempCount++;
                        if(TempCount > 15)
                            return random(150, 600);
                    }
                    Trap5Set = false;
                }
                return random(150, 300);
            } else
            {
                if(rsobject7 == null && inventoryContains(new int[] {
    c3
}))
                {
                    if(distanceTo(TrapR1) > 0)
                    {
                        WalkSmart(TrapR1);
                        moveMouse(random(526, 750), random(167, 495));
                        for(; getMyPlayer().isMoving(); wait(random(200, 500)));
                        wait(random(500, 800));
                    }
                    if(distanceTo(TrapR1) > 0)
                        return random(150, 600);
                    if(clickInventoryItem(c3, true))
                    {
                        Trap1Set = true;
                        wait(random(1500, 2000));
                        return random(150, 444);
                    } else
                    {
                        return random(150, 300);
                    }
                }
                if(rsobject13 == null && inventoryContains(new int[] {
    c3
}))
                {
                    if(distanceTo(TrapR4) > 0)
                    {
                        WalkSmart(TrapR4);
                        moveMouse(random(526, 750), random(167, 495));
                        for(; getMyPlayer().isMoving(); wait(random(200, 500)));
                        wait(random(500, 800));
                    }
                    if(distanceTo(TrapR4) > 0)
                        return random(150, 600);
                    if(clickInventoryItem(c3, true))
                    {
                        Trap4Set = true;
                        wait(random(1500, 2000));
                        return random(150, 444);
                    } else
                    {
                        return random(150, 300);
                    }
                }
                if(rsobject10 == null && inventoryContains(new int[] {
    c3
}))
                {
                    if(distanceTo(TrapR2) > 0)
                    {
                        WalkSmart(TrapR2);
                        moveMouse(random(526, 750), random(167, 495));
                        for(; getMyPlayer().isMoving(); wait(random(200, 500)));
                        wait(random(500, 800));
                    }
                    if(distanceTo(TrapR2) > 0)
                        return random(150, 600);
                    if(clickInventoryItem(c3, true))
                    {
                        Trap2Set = true;
                        wait(random(1500, 2000));
                        return random(150, 444);
                    } else
                    {
                        return random(150, 300);
                    }
                }
                if(rsobject11 == null && inventoryContains(new int[] {
    c3
}))
                {
                    if(distanceTo(TrapR3) > 0)
                    {
                        WalkSmart(TrapR3);
                        moveMouse(random(526, 750), random(167, 495));
                        for(; getMyPlayer().isMoving(); wait(random(200, 500)));
                        wait(random(500, 800));
                    }
                    if(distanceTo(TrapR3) > 0)
                        return random(150, 600);
                    if(clickInventoryItem(c3, true))
                    {
                        Trap3Set = true;
                        wait(random(1500, 2000));
                        return random(150, 444);
                    } else
                    {
                        return random(150, 300);
                    }
                }
                if(l2 > 79 && rsobject15 == null && inventoryContains(new int[] {
    c3
}))
                {
                    if(distanceTo(TrapR5) > 0)
                    {
                        WalkSmart(TrapR5);
                        moveMouse(random(526, 750), random(167, 495));
                        for(; getMyPlayer().isMoving(); wait(random(200, 500)));
                        wait(random(500, 800));
                    }
                    if(distanceTo(TrapR5) > 0)
                        return random(150, 600);
                    if(clickInventoryItem(c3, true))
                    {
                        Trap5Set = true;
                        wait(random(1500, 2000));
                        return random(150, 444);
                    } else
                    {
                        return random(150, 300);
                    }
                } else
                {
                    return random(500, 1000);
                }
            }
        } else
        {
            if(!CheckIPNoDebug())
                log("Leecher....");
            FailCount++;
            log((new StringBuilder()).append("Failed ").append(FailCount).append(" Times").toString());
            wait(random(3000, 8000));
            return random(100, 150);
        }
    }

    public boolean SetTrapR()
    {
        char c = '\u2718';
        char c1 = '\u4AF3';
        char c2 = '\u4AF8';
        char c3 = '\u4AF6';
        char c4 = '\u145C';
        char c5 = '\u1458';
        if(!inventoryContains(new int[] {
    c
}))
            return false;
        if(RTrap1 != null && RTrap2 != null && RTrap3 != null && RTrap4 != null)
            return false;
        if(Loc() == RTrap1 || Loc() == RTrap2 || Loc() == RTrap3 || Loc() == RTrap4)
        {
            WalkSmart(new RSTile(Loc().getX() + random(-3, 3), Loc().getY() + random(-3, 3)));
            for(; getMyPlayer().isMoving(); wait(random(200, 500)));
        }
        return clickInventoryItem(c, true);
    }

    public boolean PickUpR(RSItemTile rsitemtile)
    {
        char c = '\u2718';
        char c1 = '\u4AF3';
        char c2 = '\u4AF8';
        char c3 = '\u4AF6';
        char c4 = '\u145C';
        char c5 = '\u1458';
        if(rsitemtile == null)
            return false;
        if(atTile(rsitemtile, "Take Box Trap"))
        {
            if(rsitemtile == RTrap1)
                RTrap1 = null;
            if(rsitemtile == RTrap2)
                RTrap2 = null;
            if(rsitemtile == RTrap3)
                RTrap3 = null;
            if(rsitemtile == RTrap4)
                RTrap4 = null;
            return true;
        } else
        {
            return false;
        }
    }

    public int CheckTrapsR()
    {
        char c = '\u2718';
        char c1 = '\u4AF3';
        char c2 = '\u4AF8';
        char c3 = '\u4AF6';
        char c4 = '\u145C';
        char c5 = '\u1458';
        if(RTrap1 != null)
        {
            if(getObjectAt(RTrap1).getID() == c3)
                if(atTile(RTrap1, "Check"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap1 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
            if(getObjectAt(RTrap1).getID() == c2)
                if(atTile(RTrap1, "Dismantle"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap1 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
        }
        if(RTrap2 != null)
        {
            if(getObjectAt(RTrap2).getID() == c3)
                if(atTile(RTrap2, "Check"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap2 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
            if(getObjectAt(RTrap2).getID() == c2)
                if(atTile(RTrap2, "Dismantle"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap2 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
        }
        if(RTrap3 != null)
        {
            if(getObjectAt(RTrap3).getID() == c3)
                if(atTile(RTrap3, "Check"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap3 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
            if(getObjectAt(RTrap3).getID() == c2)
                if(atTile(RTrap3, "Dismantle"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap3 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
        }
        if(RTrap4 != null)
        {
            if(getObjectAt(RTrap4).getID() == c3)
                if(atTile(RTrap4, "Check"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap4 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
            if(getObjectAt(RTrap4).getID() == c2)
                if(atTile(RTrap4, "Dismantle"))
                {
                    for(; Anim() != c4; wait(random(200, 400)));
                    RTrap4 = null;
                    return random(500, 1000);
                } else
                {
                    return random(200, 500);
                }
        }
        return 4;
    }

    public void WaitDone(int i)
    {
        for(; Anim() == i; wait(random(200, 400)));
    }

    public int Anim()
    {
        return getMyPlayer().getAnimation();
    }

    public RSTile Loc()
    {
        return getMyPlayer().getLocation();
    }

    public boolean atTileDrizztG(RSTile rstile, String s)
    {
        AntiBan(random(1, 50), false);
        int i = 0;
        for(; getMyPlayer().isMoving(); wait(random(200, 400)));
        int j = getMyPlayer().getLocation().getX();
        int k = j + 1;
        int l = j - 1;
        int i1 = rstile.getX();
        setCameraRotation(90);
        Point point;
        try
        {
            point = Calculations.tileToScreen(new RSTile(rstile.getX() - 1, rstile.getY()));
            if(!tileOnScreen(rstile) || point.x == -1 || point.y == -1)
            {
                walkTileMM(rstile);
                return false;
            }
        }
        catch(Exception exception)
        {
            return false;
        }
        if(j <= i1)
            log("break MISSING_BLOCK_LABEL_246");
        if(Debug)
            log("Left");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL_246");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        if(j >= i1)
            log("break MISSING_BLOCK_LABEL");
        if(Debug)
            log("Right");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        if(j != i1)
            log("break MISSING_BLOCK_LABEL");
        if(Debug)
            log("Center");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        wait(random(50, 100));
        clickMouse(true);
        return true;
    }

    public boolean atTileDrizztO(RSTile rstile, String s)
    {
        AntiBan(random(1, 50), false);
        int i = 0;
        int j = getMyPlayer().getLocation().getY();
        int k = j + 1;
        int l = j - 1;
        int i1 = rstile.getY();
        for(; getMyPlayer().isMoving(); wait(random(200, 400)));
        setCameraRotation(90);
        Point point;
        try
        {
            point = Calculations.tileToScreen(new RSTile(rstile.getX() - 1, rstile.getY()));
            if(!tileOnScreen(rstile) || point.x == -1 || point.y == -1)
            {
                walkTileMM(rstile);
                return false;
            }
        }
        catch(Exception exception)
        {
            return false;
        }
        if(j <= i1)
            log("break MISSING_BLOCK_LABEL_246");
        if(Debug)
            log("Left");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL_246");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        if(j >= i1)
            log("break MISSING_BLOCK_LABEL");
        if(Debug)
            log("Right");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        if(j != i1)
            log("break MISSING_BLOCK_LABEL");
        if(Debug)
            log("Center");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
           log("break MISSING_BLOCK_LABEL");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        wait(random(50, 100));
        clickMouse(true);
        return true;
    }

    public boolean atTileDrizztR(RSTile rstile, String s)
    {
        AntiBan(random(1, 50), false);
        int i = 0;
        for(; getMyPlayer().isMoving(); wait(random(200, 400)));
        int j = getMyPlayer().getLocation().getY();
        int k = j + 1;
        int l = j - 1;
        int i1 = rstile.getY();
        setCameraRotation(90);
        Point point;
        try
        {
            point = Calculations.tileToScreen(new RSTile(rstile.getX() - 1, rstile.getY()));
            if(!tileOnScreen(rstile) || point.x == -1 || point.y == -1)
            {
                walkTileMM(rstile);
                return false;
            }
        }
        catch(Exception exception)
        {
            return false;
        }
        if(j <= i1)
            log("break MISSING_BLOCK_LABEL_246");
        if(Debug)
            log("Left");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL_246");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        if(j >= i1)
            log("break MISSING_BLOCK_LABEL");
        if(Debug)
            log("Right");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        if(j != i1)
            log("break MISSING_BLOCK_LABEL");
        if(Debug)
            log("Center");
        moveMouse(point, 15, 15);

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) || i >= 7)
            log("break MISSING_BLOCK_LABEL");
        point = Calculations.tileToScreen(rstile);
        if(((String)getMenuItems().get(0)).toLowerCase().contains("Dismantle".toLowerCase()))
            return false;
        moveMouse(point, 15, 15);
        i++;

        wait(random(50, 100));
        clickMouse(true);
        return true;
    }

    public boolean atTileTake(RSTile rstile, String s)
    {
        int i = 0;
        for(; getMyPlayer().isMoving(); wait(random(200, 400)));
        if(!tileOnScreen(rstile))
            walkTileMM(rstile);
        Point point;
        try
        {
            point = Calculations.tileToScreen(rstile);
            if(point.x == -1 || point.y == -1)
                return false;
        }
        catch(Exception exception)
        {
            return false;
        }
        moveMouse(point, 8, 8);
        wait(random(50, 100));
        for(; !((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) && i < 5; i++)
        {
            point = Calculations.tileToScreen(rstile);
            moveMouse(point, 8, 8);
        }

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()))
        {
            clickMouse(true);
        } else
        {
            clickMouse(false);
            atMenu(s);
        }
        wait(random(50, 100));
        return true;
    }

    public void AntiBan(int i, boolean flag)
    {
        if(flag)
            i = random(0, 15);
        if(Debug)
            log((new StringBuilder()).append("Antiban Case: ").append(i).toString());
        switch(i)
        {
        case 1: // '\001'
            setCameraRotation(random(1, 359));
            return;

        case 2: // '\002'
            setCameraAltitude(random(1.0D, 99D));
            return;

        case 3: // '\003'
            moveMouse(random(1, 760), random(1, 499));
            return;

        case 4: // '\004'
            openTab(random(0, 12));
            return;

        case 5: // '\005'
            setCameraRotation(random(1, 359));
            setCameraAltitude(random(1.0D, 99D));
            return;

        case 6: // '\006'
            int j = input.getX();
            int k = input.getY();
            moveMouse(j + random(-70, 70), k + random(-70, 70));
            j = input.getX();
            k = input.getY();
            moveMouse(j + random(-70, 70), k + random(-70, 70));
            j = input.getX();
            k = input.getY();
            moveMouse(j + random(-70, 70), k + random(-70, 70));
            j = input.getX();
            k = input.getY();
            moveMouse(j + random(-70, 70), k + random(-70, 70));
            wait(random(50, 150));
            return;

        case 7: // '\007'
            if(getCurrentTab() != 1)
                openTab(1);
            clickMouse(random(716, 721), random(415, 430), true);
            moveMouse(random(613, 633), random(421, 441));
            wait(random(1000, 2000));
            return;

        case 8: // '\b'
            int l = input.getX();
            int i1 = input.getY();
            moveMouse(l + random(-80, 80), i1 + random(-80, 80));
            wait(random(50, 150));
            return;

        case 9: // '\t'
            int j1 = input.getX();
            int k1 = input.getY();
            moveMouse(j1 + random(-80, 80), k1 + random(-80, 80));
            wait(random(50, 150));
            return;

        case 10: // '\n'
            int l1 = input.getX();
            int i2 = input.getY();
            moveMouse(l1 + random(-80, 80), i2 + random(-80, 80));
            wait(random(50, 150));
            return;

        case 11: // '\013'
            int j2 = input.getX();
            int k2 = input.getY();
            moveMouse(j2 + random(-80, 80), k2 + random(-80, 80));
            wait(random(50, 150));
            return;

        case 12: // '\f'
            int l2 = input.getX();
            int i3 = input.getY();
            moveMouse(l2 + random(-80, 80), i3 + random(-80, 80));
            wait(random(50, 150));
            return;
        }
    }

    public static boolean HostCheck()
    {
			return false;
    }

    public boolean atTileRChin(RSTile rstile, String s)
    {
        AntiBan(random(1, 50), false);
        int i = 0;
        for(; getMyPlayer().isMoving(); wait(random(200, 400)));
        if(!tileOnScreen(rstile))
            walkTileMM(rstile);
        Point point;
        try
        {
            point = Calculations.tileToScreen(rstile);
            if(point.x == -1 || point.y == -1)
                return false;
        }
        catch(Exception exception)
        {
            return false;
        }
        moveMouse(point, 4, 4);
        wait(random(50, 100));
        for(; !((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()) && i < 5; i++)
        {
            point = Calculations.tileToScreen(rstile);
            moveMouse(point, 8, 8);
        }

        if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()))
        {
            clickMouse(true);
            return true;
        }
        clickMouse(false);
        return atMenu(s);
    }

    public boolean CheckIPNoDebug()
    {
			return true;
    }

    public void standingStill()
    {
        if(oldPosition.getX() == getMyPlayer().getLocation().getX() && oldPosition.getY() == getMyPlayer().getLocation().getY())
            standingCount++;
        if(oldPosition.getX() != getMyPlayer().getLocation().getX() && oldPosition.getY() != getMyPlayer().getLocation().getY())
        {
            oldPosition = new RSTile(getMyPlayer().getLocation().getX(), getMyPlayer().getLocation().getY());
            standingCount = 0;
        }
        if(getMyPlayer().getInteracting() != null || getMyPlayer().getAnimation() != -1)
            standingCount = 0;
        if(standingCount > 5 && standingCount < 20)
        {
            log("I'm not doing anything... Probably stuck, SPIN AROUND!");
            rotate();
        }
        if(standingCount > 20)
        {
            log("I'm stuck, so will logout before the BANHAMMER.");
            log("Please post where you got stuck on the forums :)");
            stopAllScripts();
            logout = true;
        }
    }

    public boolean CheckIP()
    {
			return true;
    }

    public boolean clickInventoryItem(int i, boolean flag)
    {
        if(getCurrentTab() != 3 && !RSInterface.getInterface(762).isValid() && !RSInterface.getInterface(620).isValid())
            openTab(3);
        int ai[] = getInventoryArray();
        ArrayList arraylist = new ArrayList();
        for(int j = 0; j < ai.length; j++)
            if(ai[j] == i)
                arraylist.add(Integer.valueOf(j));

        if(arraylist.size() == 0)
        {
            return false;
        } else
        {
            int k = ((Integer)arraylist.get(random(0, arraylist.size()))).intValue();
            Point point = getInventoryItemPoint(k);
            clickMouse(point, 5, 5, flag);
            return true;
        }
    }

    public void rotate()
    {
        int i = random(37, 40);
        Bot.getInputManager().pressKey((char)i);
        wait(random(500, 1500));
        Bot.getInputManager().releaseKey((char)i);
    }

    public boolean WalkSmart(RSTile rstile)
    {
        Point point = tileToMinimap(rstile);
        if(tileOnScreen(rstile) && atTileRChin(rstile, "Walk Here"))
        {
            for(; getMyPlayer().isMoving(); wait(random(200, 400)));
            return true;
        }
        if(point.x == -1 || point.y == -1)
            return false;
        clickMouse(point, 2, 2, true);
        for(; getMyPlayer().isMoving(); wait(random(200, 400)));
        return true;
    }

    public boolean walkTileMMD(RSTile rstile)
    {
        if(tileOnScreen(rstile) && clickTileD(rstile, "Walk Here"))
            return true;
        Point point = tileToMinimap(rstile);
        if(point.x == -1 || point.y == -1)
        {
            return false;
        } else
        {
            clickMouse(point, 2, 2, true);
            return true;
        }
    }

    public boolean clickTileD(RSTile rstile, String s)
    {
        try
        {
            Point point = Calculations.tileToScreen(rstile);
            if(!tileOnScreen(rstile))
                walkTileMMD(rstile);
            moveMouse(point, 3, 3);
            clickMouse(true);
            wait(random(500, 1000));
            for(; getMyPlayer().isMoving(); wait(random(500, 1000)));
            return true;
        }
        catch(Exception exception)
        {
            return false;
        }
    }

    public boolean IsCloseTo(RSTile rstile, RSTile rstile1, int i)
    {
        int j = rstile.getX() - i;
        int k = rstile.getY() - i;
        int l = rstile.getX() + i;
        int i1 = rstile.getY() + i;
        for(int j1 = j; j1 < l; j1++)
        {
            for(int k1 = k; k1 < i1; k1++)
            {
                RSTile rstile2 = new RSTile(j1, k1);
                if(rstile2 == rstile1)
                    return true;
            }

        }

        return false;
    }

    public boolean atObjectD(RSObject rsobject, String s)
    {
        return atTile(rsobject.getLocation(), s);
    }

    public boolean atTileD(RSTile rstile, String s)
    {
        try
        {
            Point point = Calculations.tileToScreen(rstile);
            if(distanceTo(rstile) > 5)
                walkTileMMD(rstile);
            moveMouse(point, 3, 3);
            if(((String)getMenuItems().get(0)).toLowerCase().contains(s.toLowerCase()))
            {
                clickMouse(true);
            } else
            {
                clickMouse(false);
                if(!atMenu(s))
                    return false;
            }
        }
        catch(Exception exception)
        {
            return false;
        }
        wait(random(500, 1000));
        for(; getMyPlayer().isMoving(); wait(random(500, 1000)));
        return true;
    }

    public boolean WalkRandom(int i, int j, int k, int l)
    {
        int i1 = getMyPlayer().getLocation().getX();
        int j1 = getMyPlayer().getLocation().getY();
        return walkTileMMD(new RSTile(i1 + random(-k, k), j1 + random(-l, l)));
    }

    RSTile Tree1;
    RSTile Tree2;
    RSTile Tree3;
    RSTile Tree4;
    int Lizards;
    Color BG;
    boolean Debug;
    RSTile S1T1;
    RSTile S1T2;
    RSTile S1T3;
    RSTile S1T4;
    RSTile S1T5;
    RSTile S2T1;
    RSTile S2T2;
    RSTile S2T3;
    RSTile S2T4;
    RSTile S2T5;
    RSTile S3T1;
    RSTile S3T2;
    RSTile S3T3;
    RSTile S3T4;
    RSTile S3T5;
    RSTile S4T1;
    RSTile S4T2;
    RSTile S4T3;
    RSTile S4T4;
    RSTile S4T5;
    RSTile S5T1;
    RSTile S5T2;
    RSTile S5T3;
    RSTile S5T4;
    RSTile S5T5;
    RSTile TrapR1;
    RSTile TrapR2;
    RSTile TrapR3;
    RSTile TrapR4;
    RSTile TrapR5;
    boolean Green;
    boolean Orange;
    boolean Red;
    boolean Black;
    boolean RChin;
    boolean STail;
    boolean Two;
    boolean Diamond;
    boolean Square;
    int checkTime;
    long lastCheck;
    boolean powerMode;
    int randomRun;
    int rockCount;
    int oldRockCount;
    int xpPerRock;
    long avoidedCombat;
    long avoidedSmokingRocks;
    int startExp;
    int oldExp;
    int countToNext;
    int oldLevels;
    long lastAvgCheck;
    int avgPerHour;
    int Points;
    int StartPoints;
    String PointsString;
    public int startLevel;
    public int startXP;
    public long startTime;
    public long time;
    int FailCount;
    int WelcumCount;
    RSTile RTrap1;
    RSTile RTrap2;
    RSTile RTrap3;
    RSTile RTrap4;
    boolean Trap1Set;
    boolean Trap2Set;
    boolean Trap3Set;
    boolean Trap4Set;
    boolean Trap5Set;
    RSTile CTree1;
    RSTile CTree2;
    RSObject CTrap1;
    RSObject CTrap2;
    int TempCount;
    int CTrap1ID;
    int CTrap2ID;
    boolean AntiBanDebug;
    public RSTile oldPosition;
    public boolean logout;
    int standingCount;
}